<template>
    <div class="flex_col_start m5 p10 card">
        <label class="flex_center_self">搅拌盖电机</label>
        <div class="flex_row_center mt5">
            <el-button @click="onClickCtrl(0)" type="primary">打开</el-button>
            <el-button @click="onClickCtrl(1)" type="primary">关闭</el-button>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { stir_motor_ctrl } from '@/service/devices/heat';
import { runAction } from '@/utils/ui';


async function onClickCtrl(ctrl: number) {
    await runAction('搅拌电机', '', async () => {
        await stir_motor_ctrl(ctrl);
    });
}

</script>
